let tabs = document.getElementsByClassName("tab");
let shows = document.getElementById("show"); //展示框架

for (let index = 0; index < tabs.length; index++) {
  tabs[index].addEventListener("click", function (e) {
    const { res } = this.$http.get("/page1");
    var node = document.createElement("li");
    var textnode = document.createTextNode(`${res.data}`);
    node.appendChild(textnode);
    node.setAttribute("id", "showPage");

    var delechild = document.getElementById("showPage");
    shows.removeChild(delechild);
    shows.appendChild(node); //  显示页面

    //改变选中样式
    // removeOtherStyle()
    tabs[index].setAttribute("className", "active");
  });
}
